﻿<UserControl x:Class="VmroleAuthor.Views.ResExtDeploymentOptionParameterView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignWidth="600">
    <UserControl.Resources>
    </UserControl.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="6" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="6" />
            <RowDefinition Height="Auto" />
            <RowDefinition MinHeight="24" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="6"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="6"/>
        </Grid.ColumnDefinitions>

        <Grid Grid.Row="1" Grid.Column="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="10"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Column ="0" Text="{Binding Name}"  FontWeight="Bold" VerticalAlignment="Center"/>
            <Button Grid.Column="2" x:Name="DescriptionButton" HorizontalAlignment="Left" Background="Transparent" BorderBrush="Transparent">
                <Button.ToolTip>
                    <TextBlock Text="{Binding Description}"/>
                </Button.ToolTip>
                <StackPanel Orientation = "Horizontal">
                    <Image  Source="..\Img\Help.ico" Width="20" Height="20"></Image>
                </StackPanel>
            </Button>
        </Grid>
    
        <ComboBox x:Name="SettingOptionName" Grid.Row="3" Grid.Column="1" VerticalAlignment="Center" VerticalContentAlignment="Center"
                                      ItemsSource="{Binding  Options}" Height="24" ToolTip="{Binding ToolTipOption}"
                                      SelectedItem="{Binding SelectedOption, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"                                 
                                      Validation.ErrorTemplate="{x:Null}"/>

        <ContentPresenter Grid.Row="4" Grid.Column="1" Content="{Binding ElementName=SettingOptionName, Path=(Validation.Errors).CurrentItem}" />
        
    </Grid>
</UserControl>
